package com.lam.common.components.dict.constant;

/**
 * 字典类型
 * @author lam
 */
public enum DictTypeEnum {
	
	/** 字典类型,dict普通字典 */
	SIMPLE_DICT("dict", "普通字典"),
	
	/** 字典类型，tableDict自定义字典 */
	TABLE_DICT("tableDict", "自定义字典"),
	;
	private String type;
	private String name;
	
	private DictTypeEnum(String type, String name) {
		this.type = type;
		this.name = name;
	}
	
	public static DictTypeEnum valueFrom(String type) {
		for (DictTypeEnum o : values()) {
			if(o.type.equalsIgnoreCase(type)) {
				return o;
			}
		}
		return null;
	}
	
	public String getType() {
		return type;
	}
	public String getName() {
		return name;
	}
	
	

}
